<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/tld/authority.tld" prefix="authority" %>
<%@ taglib uri="/tld/navigator.tld" prefix="navigator" %>
<%@ taglib uri="/tld/pagination.tld" prefix="page" %>

<%--<div class="pageheader">
    <h2>品牌管理</h2>

    <div class="breadcrumb-wrapper">
        <span class="left color-999 font13">您当前的位置：</span>
        <ol class="breadcrumb left">
            <li>参数管理</li>
            <li>品牌管理</li>
        </ol>
    </div>
</div>--%>
<navigator:navigator url="brand/query.htm"/>

<div class="contentpanel">

    <div class="panel panel-default panel-bottom-no">
        <div class="row">
            <form>
                <input type="hidden" name="start" value="${query.start}">
                <input type="hidden" name="length" value="${query.length}">

                <div class="panel-body panel-body2 border-gray-b ">
                    <div class="col-md-7" style="margin-left: -58px;">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">企业类型：</label>

                            <div class="col-sm-6">
                                <div class="select-container select">
                                    <select class="select select-offscreen" name="supplierType">
                                        <option value="">-请选择-</option>
                                        <option value="1" ${1 eq query.supplierType?"selected":""}>-专业性-</option>
                                        <option value="2" ${2 eq query.supplierType?"selected":""}>-综合性-</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-7" style="margin-left: -40px">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">是否禁用：</label>

                            <div class="col-sm-6">
                                <div class="select-container select">
                                    <select class="select select-offscreen" name="disabled">
                                        <option value="">-请选择-</option>
                                        <option value="1" ${1 eq query.disabled?"selected":""}>-是-</option>
                                        <option value="0" ${0 eq query.disabled?"selected":""}>-否-</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-7" style="margin-left: 26px">
                        <div class="form-group input-group">
                            <div class="select-container select select-container50 input-group-btn col-dm-3">
                                <a class="select-choice select-choice2">
                                    <span>品牌名称</span>
                                </a>
                            </div>
                            <input class="form-control form-control2" type="text" placeholder="请输入查询关键词" name="name" value="${query.name}" />
                        </div>
                    </div>
                    <div class="btn-group2 left">
                        <button type="submit" class="btn btn-primary btn-4-query"><i class="icon icon-chaxun"></i>查询</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div class="panel panel-default">

        <%--<div class="row">
            <div class="panel-body panel-body2  plr20">

                <div class="left">
                    <div class="btn-group left btn-group-none2">
                        <authority:authority url="/brand/add">
                            <button class="btn btn-primary btn-4-add"><i class="icon icon-tianjia"></i>新增</button>
                        </authority:authority>
                    </div>
                </div>
            </div>
        </div>--%>

        <%--Table--%>
        <div class="row">
            <div class=" plr20">
                <div class="table-responsive">
                    <table class="table dataTable">
                        <tbody>
                        <tr>
                            <th style="width: 100px;">序号</th>
                            <th><strong>品牌名称</strong></th>
                            <th><strong>品牌图片</strong></th>
                            <th style="width: 100px;"><strong>编码</strong></th>
                            <th style="width: 300px;"><strong>企业名称</strong></th>
                            <th style="width: 300px;"><strong>厂家类型</strong></th>
                            <th style="width: 100px;"><strong>价格保护</strong></th>
                            <th style="width: 100px;"><strong>是否禁用</strong></th>
                            <th style="width: 100px;"><strong>排序值</strong></th>
                            <th style="width: 160px;"><strong>操作</strong></th>
                        </tr>
                        <c:forEach items="${paging.items}" var="item" varStatus="status">
                            <tr>
                                <td>${(paging.pageIndex - 1) * paging.pageSize + (status.index + 1)}</td>
                                <td>${item.name}</td>
                                <td><a><img src="${item.logo}" style="height: 30px;"></a></td>
                                <td>${item.identifier}</td>
                                <td>${item.companyName}</td>
                                <td><c:if test="${1 eq item.supplierType}">专业性</c:if>
                                    <c:if test="${2 eq item.supplierType}">综合性</c:if>
                                </td>
                                <td>${1 eq item.protection?"是":"否"}</td>
                                <td>${item.disabled?"是":"否"}</td>
                                <td>${item.seq}</td>
                                <td>
                                    <authority:authority url="/brand/modify">
                                        <a class="btn-4-modify" data-id="${item.id}">修改</a>
                                    </authority:authority>
                                    <%--<authority:authority url="/brand/delete">
                                        <a class="btn-4-delete margin-l-10" data-id="${item.id}">删除</a>
                                    </authority:authority>--%>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <page:page pageIndex="${paging.pageIndex}" pageSize="${paging.pageSize}" count="${paging.count}"/>
            </div>
        </div>
    </div>
    <script src="js/dictionary/brand-List.js" charset="UTF-8"></script>
</div>